﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using AMatysiak.Collections;

namespace AMatysiakTest.Collections
{
    [TestClass]
    public class PairObjectTest
    {
        [TestMethod]
        public void creationTest()
        {
            Pair pair = new Pair("key", 2);
            Assert.AreEqual("key", pair.Key);
            Assert.AreEqual(2, pair.Value);
        }

        [TestMethod]
        public void equalityTest()
        {
            Pair pair1 = new Pair("key", 2);
            Pair pair2 = new Pair("key", 2);
            Assert.AreEqual(pair1, pair2);
        }

        [TestMethod]
        public void notEqualityTest()
        {
            Pair pair1 = new Pair("key", 2);
            Pair pair2 = new Pair("key", 3);
            Assert.AreNotEqual(pair1, pair2);
        }
    }
}
